function A = swloadsp(links)
% Load links (sparse matrix)
% scripted by Sun Sibai
% 2015 Apr. 8
%   links: many (source,target) pairs
%   A_{source,target} = 1 (if in links), 0 (if not)
 Np = max(max(links))
 Nl = size(links,1)
 A = sparse(links(:,1),links(:,2),ones(Nl,1),Np,Np);
end
